#ifndef CPCAPUDPSEGMENT_H
#define CPCAPUDPSEGMENT_H

#include "pcappacket.h"

class CPCapUdpSegment : public CPCapPacket
{
    Q_OBJECT
    Q_PROPERTY(QString sourcePort READ sourcePort WRITE setSourcePort NOTIFY sourcePortChanged)
    Q_PROPERTY(QString destPort READ destPort WRITE setDestPort NOTIFY destPortChanged)
public:
    explicit CPCapUdpSegment(QObject *parent = Q_NULLPTR);
    ~CPCapUdpSegment();

    QString sourcePort() const;
    void setSourcePort(const QString &sourcePort);

    QString destPort() const;
    void setDestPort(const QString &destPort);

    int headerLength() Q_DECL_OVERRIDE;
    bool buildHeader(QByteArray &header) Q_DECL_OVERRIDE;

Q_SIGNALS:
    void sourcePortChanged();
    void destPortChanged();

private:
    QString m_sourcePort;
    QString m_destPort;
};

#endif // CPCAPUDPSEGMENT_H
